//
//  HomeViewController.h
//  OrderSeat
//
//  Created by wangwei on 13-10-4.
//  Copyright (c) 2013年 wangwei. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "CitysViewController.h"

@class MyPageControl;
@class HomeDataSource;
@interface HomeViewController : BaseViewController<UIGestureRecognizerDelegate,UITextFieldDelegate,UIScrollViewDelegate,CitysViewControllerDelegate>

@property (weak,   nonatomic) IBOutlet UILabel *titleLabel;
@property (weak,   nonatomic) IBOutlet UIButton *couponBtn;
@property (weak,   nonatomic) IBOutlet UIButton *gourmetBtn;
@property (weak,   nonatomic) IBOutlet UIButton *deliveryBtn;
@property (weak,   nonatomic) IBOutlet UIButton *activityBtn;
@property (weak,   nonatomic) IBOutlet UIButton *cityBtn;
@property (strong, nonatomic) MyPageControl *pageControl;
@property (strong, nonatomic) IBOutlet UIScrollView * activityScroll;
@property (strong, nonatomic) IBOutlet UITextField *searchTF;
@property (weak,   nonatomic) IBOutlet UIImageView *activityImage;
@property (weak,   nonatomic) IBOutlet UIView *headView;
@property (weak,   nonatomic) IBOutlet UIView *findView;
@property (weak,   nonatomic) IBOutlet UIView *buttonsView;
@property (weak,   nonatomic) IBOutlet UIView *activityView;
@property (strong, nonatomic) NSTimer *pageTimer;

@property (assign, nonatomic) BOOL isToUCenter;
@property (strong, nonatomic) HomeDataSource *dataSource;


@end

@interface HomeDataSource : BaseDataSource<UIAlertViewDelegate>

@property (assign, nonatomic) int dataVersion;
@property (strong, nonatomic) NSMutableArray *activityList;
@property (strong, nonatomic) HomeViewController *viewController;
@property (strong, nonatomic) NSString *cityId;
@property (strong, nonatomic) NSString *cityName;

- (void)fetchActivitys;
- (void)fetchCurrentCity;

@end
